
class Animal1 {
    public String name;
    public int age;

    public void eat() {
        System.out.println("这是一个父类方法");
    }
}

class Cat1 extends Animal {
    public String haig;

    public void eat() {
        System.out.println("这是一个子类方法");
    }
}

public class TestDemo1 {
    public static void main(String[] args) {

    }
}
